package com.supkong.prototype.simple;

/**
 * @author Kong
 * @date 2019/01/02
 * describe:
 */
public class Test {
    public static void main(String[] args) {
        CloneTarget cloneTarget = new CloneTarget();
        cloneTarget.setName("111");
        cloneTarget.setCloneTarget(new CloneTarget());
        System.out.println(cloneTarget.hashCode());
        System.out.println(cloneTarget.getCloneTarget().hashCode());
        System.out.println("-------------");
        try {
            CloneTarget obj = (CloneTarget) cloneTarget.clone();
            System.out.println(obj.hashCode());
            System.out.println(obj.getCloneTarget().hashCode());
            System.out.println(obj.getCloneTarget() == cloneTarget.getCloneTarget());
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

    }
}
